<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>淘宝案例</title>
    <style>
        .tb {
            position: relative;
            width: 520px;
            height: 280px;
            background-color: cyan;
            margin: 100px auto;
        }
        
        li {
            list-style: none;
        }
        
        .tb img {
            width: 520px;
            height: 280px;
        }
        
        .left {
            position: absolute;
            left: 0;
            top: 50%;
            margin-top: -15;
            /* 加了绝对定位的盒子可以直接设置宽度和高度*/
            width: 20px;
            height: 30px;
            border-radius: 5;
            background-color: rgba(0, 0, 0, .3);
            text-align: center;
            color: #fff;
            text-decoration: none;
            border-top-right-radius: 20px;
            border-bottom-right-radius: 20px;
        }
        
        .right {
            position: absolute;
            right: 0;
            top: 50%;
            margin-top: -15;
            width: 20px;
            height: 30px;
            background-color: rgba(0, 0, 0, .3);
            text-align: center;
            text-decoration: none;
            color: #fff;
            border-top-left-radius: 20px;
            border-bottom-left-radius: 20px;
        }
        
        .tb-nav {
            position: absolute;
            bottom: 10px;
            left: 50%;
            margin-left: -40px;
            width: 80px;
            height: 15px;
            background-color: rgba(255, 255, 255, .3);
            border-radius: 7px;
        }
        
        .tb-nav li {
            float: left;
            /*使用float浮动*/
            width: 8px;
            height: 8px;
            background-color: #fff;
            border-radius: 50%;
            margin: 3px;
        }
        
        .tb-nav .select {
            /*注意权重的问题*/
            background-color: brown;
        }
    </style>
</head>

<body>
    <div class="tb">
        <img src="tb.jpg" alt="">
        <a href="#" class="left">
            > </a>
        <a href="#" class="right">
            < </a>
                <ul class="tb-nav">
                    <li class="select"></li>
                    <li></li>
                    <li></li>
                    <li></li>
                    <li></li>
                </ul>
    </div>

</body>

</html>